home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / architecture / m68k / intr.h < prev    next >
C/C++ Source or Header  |  1992-11-10  |  2KB  |  80 lines

  1. /*    @(#)intr.h    1.0    10/16/91    (c) 1991 NeXT Computer Inc.    */
  2.  
  3. /* 
  4.  * HISTORY
  5.  * 16-Oct-91  John Seamons (jks) at NeXT
  6.  *    Split out from cpu.h.
  7.  */
  8.  
  9. #ifndef    _M68K_INTR_
  10. #define    _M68K_INTR_
  11.  
  12. /*
  13.  * Interrupt structure.
  14.  * BASE and BITS define the origin and length of the bit field in the
  15.  * interrupt status/mask register for the particular interrupt level.
  16.  * The first component of the interrupt device name indicates the bit
  17.  * position in the interrupt status and mask registers; the second is the
  18.  * interrupt level; the third is the bit index relative to the start of the
  19.  * bit field.
  20.  */
  21. #define    I(l,i,b)    (((b) << 8) | ((l) << 4) | (i))
  22. #define    I_INDEX(i)    ((i) & 0xf)
  23. #define    I_IPL(i)    (((i) >> 4) & 7)
  24. #define    I_BIT(i)    ( 1 << (((i) >> 8) & 0x1f))
  25.  
  26. #define    I_IPL7_BASE    0
  27. #define    I_IPL7_BITS    2
  28. #define    I_NMI        I(7,0,31)
  29. #define    I_PARITY_ADBNMI    I(7,1,30)
  30.  
  31. #define    I_IPL6_BASE    2
  32. #define    I_IPL6_BITS    12
  33. #define    I_TIMER        I(6,0,29)
  34. #define    I_ENETX_DMA    I(6,1,28)
  35. #define    I_ENETR_DMA    I(6,2,27)
  36. #define    I_SCSI_DMA    I(6,3,26)
  37. #define    I_OPTICAL_DMA    I(6,4,25)    /* dma 313 chip */
  38. #define    I_PRINTER_DMA    I(6,5,24)
  39. #define    I_SOUND_OUT_DMA    I(6,6,23)
  40. #define    I_SOUND_IN_DMA    I(6,7,22)
  41. #define    I_SCC_DMA    I(6,8,21)    /* dma 313 chip */
  42. #define    I_DSP_DMA    I(6,9,20)
  43.  
  44. #define    I_IPL5_BASE    14
  45. #define    I_IPL5_BITS    3
  46. #define    I_SCC        I(5,0,17)
  47. #define    I_REMOTE    I(5,1,16)
  48. #define    I_BUS        I(5,2,15)
  49.  
  50. #define    I_IPL4_BASE    17
  51. #define    I_IPL4_BITS    1
  52. #define    I_DSP        I(4,0,14)
  53.  
  54. #define    I_IPL3_BASE    18
  55. #define    I_IPL3_BITS    12
  56. #define    I_VIDEO        ((dma_chip != 313)? I(3,0,13) : I(3,8,5))
  57. #define    I_C16_VIDEO    I(3,0,13)    /* Warp 9C */
  58. #define    I_OPTICAL    I(3,0,13)    /* dma 313 chip */
  59. #define    I_SCSI        I(3,1,12)
  60. #define    I_PRINTER    I(3,2,11)
  61. #define    I_ENETX        I(3,3,10)
  62. #define    I_ENETR        I(3,4,9)
  63. #define    I_SOUND_OVRUN    I(3,5,8)
  64. #define    I_FLOPPY    I(3,6,7)
  65. #define    I_SPARE_3    I(3,7,6)
  66. #define    I_VIDEO_IN    I(3,8,5)
  67. #define    I_MONITOR    I(3,9,4)
  68. #define    I_KYBD_MOUSE    I(3,10,3)
  69. #define    I_RTC        I(3,11,2)
  70.  
  71. #define    I_IPL2_BASE    30
  72. #define    I_IPL2_BITS    1
  73. #define    I_SOFTINT1    I(2,0,1)
  74.  
  75. #define    I_IPL1_BASE    31
  76. #define    I_IPL1_BITS    1
  77. #define    I_SOFTINT0    I(1,0,0)
  78.  
  79. #endif    _M68K_INTR_
  80.